import Vue from 'vue';
import Router from 'vue-router';
import HomePage from '@/pages/HomePage';
// import RulesPage from '@/components/RulesPage';
// import InvitationCode from '@/components/InvitationCode';
// import RankingList from '@/components/RankingList';
// import SharePage from '@/components/SharePage';
// import PrizePage from '@/components/PrizePage';
// import Countdown from '@/pages/Countdown';
// import Quiz from '@/pages/Quiz';
// import Read from "@/pages/Read";
// import NotFound from '@/pages/NotFound';
// import BindingInfoPage from "@/components/BindingInfo";
// import Certificate from "@/components/Certificate";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HomePage',
      component: HomePage,
      children: [
        {
          path: 'rules',
          component: () =>
            import(/* webpackChunkName: "home" */ '@/components/RulesPage'),
        },
        // {
        //   path: 'invitation',
        //   component: InvitationCode
        // },
        // {
        //   path: 'share',
        //   component: SharePage
        // },
        // {
        //   path: 'prize',
        //   component: PrizePage
        // },
        // {
        //   path: 'binding',
        //   component: BindingInfoPage
        // }
      ],
    },
    {
      path: '/rank',
      name: 'rank',
      component: () =>
        import(/* webpackChunkName: "rank" */ '@/pages/RankingList'),
    },
    {
      path: '/certificate',
      name: 'certificate',
      component: () =>
        import(/* webpackChunckName: "rank" */ '@/components/Certificate'),
    },
    {
      path: '/countdown',
      component: () =>
        import(/* webpackChunkName: "quiz" */ '@/pages/Countdown'),
    },
    {
      path: '/quiz',
      component: () => import(/* webpackChunkName: "quiz" */ '@/pages/Quiz'),
    },
    {
      path: '/read',
      component: () => import(/* webpackChunkName: "read" */ '@/pages/Read'),
    },
    {
      path: '*',
      component: () => import(/* webpackChunkName: "any" */ '@/pages/NotFound'),
    },
  ],
});
